<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>通信</title>
    <style>
        #app{
            border:1px solid black;
            margin: 300px auto;
            text-align:center;
        }
    </style>
</head>
<body>
    <div id="app">
        <input type="text" name="" id="" v-model="wether">
        <my-component :message="wether"img-src="https://thirdwx.qlogo.cn/mmopen/vi_32/V2ia2wtGMQat4oXRSYew6vAka2LZchDkuQBuNSEa8bonyPXkSflOBTrtcoSYVLhrLrYf1cOiaXn5lZNDRF8uIibvw/132"></my-component>
    </div>
    <template id="temp">
        <div>
            <h3>{{message}}</h3>
            <img :src="imgSrc" alt="看不见的">
        </div>
    </template>
    <script type="text/javaScript" charset="UTF-8" src="/JS文件/vue.js"></script>
    <script>
        Vue.component("my-component",{
            props:["message","imgSrc"],
            template:'#temp'
           
        });
        var vm = new Vue({
            el:'#app',
            data:{
                wether:"今天天气真好"
            }
        })
    </script>
</body>
</html>